<?php
   $user=$_POST['user'];
   $id=$_POST['id'];
   require('sql.php');
  $sql="DELETE FROM shoucang WHERE id='$id' AND cookie='$user'";
  mysqli_query($conn, $sql);
  $result = mysqli_query($conn,"SELECT * FROM shoucang");
  $num=mysqli_num_rows($result);
  if($num)
  {
  	echo 1;
  }
  else{
  	echo 0;
  }
  
  mysqli_close($conn);
?>